package com.tf_cut.backend.mapper;

import com.tf_cut.backend.seller.pojo.ProvideDetail;
import com.tf_cut.backend.seller.pojo.SellerOrder;
import com.tf_cut.backend.seller.vo.SellerOrderVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

@Repository
public interface SellerOrderMapper {
	List<SellerOrderVo> findListSellerOrder(SellerOrderVo vo);
	
	List<SellerOrderVo> findByProjectInfo(String orderId);

	BigDecimal calSellerOrderAmount(SellerOrderVo vo);

	int updateSellerOrder(SellerOrderVo vo);

	SellerOrderVo findSellerOrder(SellerOrderVo vo);

	List<ProvideDetail> queryDetailByOrderId(@Param("orderId") String orderId);

	void updateDetail(@Param("status")int status,@Param("reason")String reason,@Param("id")String id);

	void updateDetailPaymentStatus(@Param("paymentStatus")String paymentStatus,@Param("id")String id);

	void updateDetailPaymentStatusByOrderId(@Param("paymentStatus")String paymentStatus,@Param("orderId")String orderId);
	
	List<SellerOrderVo> findMoney(@Param("sellerName")String sellerName,@Param("serviceName") String serviceName, @Param("startDate")String startDate, @Param("endDate")String endDate, @Param("orderId")String orderId);
	
	List<SellerOrderVo> queryApply(@Param("sellerName")String sellerName,@Param("serviceName") String serviceName, @Param("startDate")String startDate, @Param("endDate")String endDate, @Param("orderId")String orderId);

	void insOrder(SellerOrder order);

	void insOrderDetail(ProvideDetail detail);
}
